package com.zlzxm.shoesmarket.view.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.zlzxm.shoesmarket.R;
import com.zlzxm.shoesmarket.view.adapter.entity.EntityMatchUser;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * CREATE BY zlzxm ON 4/22/21
 */
public class ADMatchUser extends BaseQuickAdapter<EntityMatchUser, BaseViewHolder> {
    public ADMatchUser() {
        super(R.layout.item_match_user);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, EntityMatchUser entity) {

        holder.setText(R.id.tvTime,entity.getTime());
        holder.setText(R.id.tvAddress,entity.getAddress());
        holder.setText(R.id.tvPrice,entity.getPrice());

        Glide.with(getContext())
                .load(entity.getFace())
                .circleCrop()
                .into((ImageView) holder.getView(R.id.ivFace));

    }
}
